package com.thibal.lylo;



public class LyloRow {

	private String bandName = "";
	private String time = "";
	private int stylePicto;
	private String price = "";
	private int quarterNamePicto;
	private String placeName = "";
	private String placeUrl = "";
	private String bandDescription = "";
	
	public String getBandName() {
		return bandName;
	}
	public void setBandName(String bandName) {
		this.bandName = bandName;
	}
	public String getTime() {
		return time;
	}
	public void setTime(String time) {
		this.time = time;
	}
	public int getStyle() {
		return stylePicto;
	}
	public void setStyle(String style) {
		this.stylePicto = findStylePicto(style);
	}
	public String getPlaceName() {
		return placeName;
	}
	public void setPlaceName(String placeName) {
		this.placeName = placeName;
	}
	public String getPlaceUrl() {
		return placeUrl;
	}
	public void setPlaceUrl(String placeUrl) {
		this.placeUrl = placeUrl;
	}
	
	public String getPrice() {
		return price;
	}
	public void setPrice(String price) {
		this.price = price;
	}

	public int getQuarterName() {
		return quarterNamePicto;
	}
	public void setQuarterName(String quarterName) {
		this.quarterNamePicto = findQuarterPicto(quarterName);
	}
	public String getBandDescription() {
		return bandDescription;
	}
	public void setBandDescription(String bandDescription) {
		this.bandDescription = bandDescription;
	}
	
	
	
	public LyloRow()
	{
		;
	}
	
	private int findStylePicto(String style)
	{
		String res = style.subSequence(style.lastIndexOf('/')+1, style.indexOf(".png")).toString();
		if(res.equals("style-0-16x16"))
			return R.drawable.style_0_16x16;
		if(res.equals("style-1-16x16"))
			return R.drawable.style_1_16x16;
		else if(res.equals("style-2-16x16"))
			return R.drawable.style_2_16x16;
		else if(res.equals("style-3-16x16"))
			return R.drawable.style_3_16x16;
		else if(res.equals("style-4-16x16"))
			return R.drawable.style_4_16x16;
		else if(res.equals("style-5-16x16"))
			return R.drawable.style_5_16x16;
		else if(res.equals("style-6-16x16"))
			return R.drawable.style_6_16x16;
		else if(res.equals("style-enfants-16x16"))
			return R.drawable.style_enfants_16x16;
		return 0;
	}
	
	private int findQuarterPicto(String quarter)
	{
		String res = quarter.subSequence(quarter.lastIndexOf('/')+1, quarter.indexOf(".png")).toString();
		
		if(res.equals("region-a"))
			return R.drawable.region_a;
		else if(res.equals("region-b"))
			return R.drawable.region_b;
		else if(res.equals("region-c"))
			return R.drawable.region_c;
		else if(res.equals("region-d"))
			return R.drawable.region_d;
		else if(res.equals("region-e"))
			return R.drawable.region_e;
		else if(res.equals("region-f"))
			return R.drawable.region_f;
		else if(res.equals("region-g"))
			return R.drawable.region_g;
		else if(res.equals("region-h"))
			return R.drawable.region_h;
		else if(res.equals("region-i"))
			return R.drawable.region_i;
		else if(res.equals("region-j"))
			return R.drawable.region_j;
		else if(res.equals("region-k"))
			return R.drawable.region_k;
		else if(res.equals("region-l"))
			return R.drawable.region_l;
		else if(res.equals("region-m"))
			return R.drawable.region_m;
		else if(res.equals("region-n"))
			return R.drawable.region_n;
		else if(res.equals("region-o"))
			return R.drawable.region_o;
		else if(res.equals("region-p"))
			return R.drawable.region_p;
		else if(res.equals("region-q"))
			return R.drawable.region_q;
		else if(res.equals("region-r"))
			return R.drawable.region_r;
		else if(res.equals("region-s"))
			return R.drawable.region_s;
		else if(res.equals("region-t"))
			return R.drawable.region_t;
		else if(res.equals("region-u"))
			return R.drawable.region_u;
		else if(res.equals("region-v"))
			return R.drawable.region_v;
		else if(res.equals("region-w"))
			return R.drawable.region_w;
		else if(res.equals("region-x"))
			return R.drawable.region_x;
		return 0;
	}
}
